package cn.funeralobjects.upms.model;

import cn.funeralobjects.upms.enums.HttpMethod;
import cn.funeralobjects.upms.enums.Protocol;
import cn.funeralobjects.util.annotation.ArgHasLength;
import cn.funeralobjects.util.annotation.ArgNonNull;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.EqualsAndHashCode;
import lombok.NoArgsConstructor;
import lombok.experimental.Accessors;


/**
 * Api模型
 *
 * @author FuneralObjects
 * Create date: 2020/4/26 2:18 PM
 */
@Data
@Accessors(chain = true)
@EqualsAndHashCode(exclude = {"name"})
@AllArgsConstructor
@NoArgsConstructor
public class Api {
    /**
     * 名称
     */
    @ArgHasLength
    private String name;
    /**
     * 范围
     */
    @ArgHasLength
    private String scope;
    /**
     * 协议
     */
    @ArgNonNull
    private Protocol protocol;
    /**
     * 方法
     */
    @ArgNonNull
    private HttpMethod method;
    /**
     * 路径
     */
    @ArgHasLength
    private String url;
}
